package com.tencent.welink.api.space.object.manage;

import com.alibaba.fastjson.JSONArray;
import com.tencent.welink.api.OpenApiTokenChange;
import com.tencent.welink.api.base.WelinkOpenApi;
import com.tencent.welink.config.BussinessConfig;
import com.tencent.welink.util.CrontabUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Map;

/**
 * @Description: 获取通用id对象信息
 * @Author: limye
 * @CreateDate: 2020-6-9
 * @Version: V1.0
 */
public class GetProfileBatch extends WelinkOpenApi {

    private static final Logger log = LogManager.getLogger(GetProfileBatch.class);

    public GetProfileBatch(){
        super("/space/datahub/common-object/getProfileBatch",false);
    }


    @Override
    public void displayResult(String result) {
    }


    public static void main(String[] args) {
        new BussinessConfig();
        CrontabUtil.addTaskInRate(new OpenApiTokenChange(), BussinessConfig.loginDurationMinutes,true);

        //实例化对象
        GetProfileBatch instance = new GetProfileBatch();

        /**
         * 参数名	类型	必填	描述	数据约束
         * token	String	是	非空且长度固定128个字符	动态密钥，有效期20分钟，需重新登录
         */

        //添加参数
        JSONArray jsonArray = new JSONArray();
        jsonArray.add("xxx11111");
        jsonArray.add("xx11112");
        instance.getBodyPara().put("",jsonArray.toJSONString());

        //执行HTTP请求及展示结果
        instance.DoHttp();
        CrontabUtil.shutdown();

    }
}
